<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<button>请求</button>
<script>
    const btn = document.querySelector("button");
    btn.onclick = function () {
        fetch('http://localhost:8080/fetch_post?vip=10', {
            method: 'POST',
            headers: {
                name: 'zs'
            },
            body: 'username=admin&password=admin2'
        }).then(response => {
            return response.json();
        }).then(response => {
            console.log(response);
        })
    }
</script>
</body>
</html>